import { Router } from 'express';
import * as Controller from '../api/controllers/announcement.controller';

const router = Router();

router
  .route('/')
  .get(
    Controller.getAnnouncements
  );

router
  .route('/:id')
  .get(
    Controller.getAnnouncementById
  );

router
  .route('/')
  .post(
    Controller.addAnnouncement
  );

router
  .route('/:id')
  .put(
    Controller.updateAnnouncementById
  );

router
  .route('/:id')
  .delete(
    Controller.deleteAnnouncementById
  );

router
  .route('/upload')
  .post(
    Controller.upload
  );

export default router;